package com.qingcheng.config;

import com.qingcheng.service.business.AdService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author:boy
 * @Date:2019/7/8
 * @description:
 * @ModifiedBy:
 */
@Component
public class AdInit implements InitializingBean {
    @Autowired
    private AdService adService;
    public void afterPropertiesSet() throws Exception {
        System.out.println("====广告信息预热====");
        adService.saveAllAdToRedis();
    }
}
